import request from '@/router/axios';

export const getList = ( params) => {
  return request({
    url: 'api/blade-system/role/list',
    method: 'get',
    params: {
      ...params,
    }
  })
}
export const remove = (ids) => {
  return request({
    url: 'api/blade-system/role/remove?ids=' + ids,
    method: 'post',
    params: {}
  })
}
export const submit = (params) => {
  return request({
    url: 'api/blade-system/role/submit',
    method: 'post',
    data: {
      ...params
    }
  })
}
export const getTree = () => {
  return request({
    url: 'api/blade-system/menu/my-grant-tree',
    method: 'get',
    params: {}
  })
}
export const grant = (params) => {
  return request({
    url: 'api/blade-system/role/grant',
    method: 'post',
    data: {
      ...params
    }
  })
}
export const getTreeKey = (roleIds) => {
  return request({
    url: 'api/blade-system/menu/role-tree-keys?roleIds='+roleIds,
    method: 'get',
    params: {}
  })
}
